package org.tln.db137.common;

import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 统一接口返回对象
 */
@Data
public class R implements Serializable {
    private int code=203;
    private String message="上传成功！";
    private Map<String,Object> data=new HashMap<>();
    public R add(String key,Object value){
        this.data.put(key,value);
        return this;
    }

    public R setMessage(String message) {
        this.message = message;
        return this;
    }

    public R setCode(int code) {
        this.code = code;
        return this;
    }
}
